<?php
namespace qick;
/**
 * qickqick 错误接口
 */


class qick_error
{
    public static function put($number, $callBack)
    {
        $method = 'error_'. $number;
        self::$method();
        call_user_func($callBack, function($text) {
            echo "<h3>{$text}</h3>";
        });
        exit(0);
    }

    public static function error_500()
    {
        header('HTTP/1.1 500 Internal Server Error');
        echo "<h2>Error Code 500</h2>";
    }

    public static function error_404()
    {
        header('HTTP/1.1 404 Not Found');
        echo "<h2>404 Not Found</h2>";
    }
}